import Link from 'next/link'; import { notFound } from 'next/navigation'; import { Section, KV } from '@/components/ui/section'; import { Badge, StatusBadge } from '@/components/ui/badge'; import { JsonView } from '@/components/ui/json-view'; import { getRun } from '@/lib/queries/sources'; import { fmtDateTime, fmtDuration, fmtInt } from '@/lib/format'; export default async function RunPage({ params }: { params: Promise<{ runId: string }> }) { const { runId } = await params; const r = await getRun(runId); if (!r) notFound(); return (

Ingest run

{r.id}

{r.source_name ?? r.connector_id} {r.mode} {r.anomaly ? anomaly: {r.anomaly} : null}

{fmtInt(r.records_fetched)} }, { k: 'Created', v: {fmtInt(r.records_created)} }, { k: 'Updated', v: {fmtInt(r.records_updated)} }, { k: 'Unchanged', v: {fmtInt(r.records_unchanged)} }, { k: 'Rejected', v: {fmtInt(r.records_rejected)} }, { k: 'Validation failures', v: {fmtInt(r.validation_failures)} }, { k: 'HTTP requests / failures', v: {fmtInt(r.http_requests)} / {fmtInt(r.http_failures)} }, { k: 'Rate-limit events', v: {fmtInt(r.rate_limit_events)} }, { k: 'Dataset version', v: r.dataset_version ? {r.dataset_version} : null }, { k: 'Error', v: r.error ? {r.error} : null }, ]} />

Before

After

{r.schema_drift?.length ? :

No schema drift detected in this run.

}
{r.log?.length ? (
            {r.log.map((l, i) => (
              
{l.t} {l.level.padEnd(5)} {l.msg}
))}
) : (

Empty log.

)}
); }